Telegram Group & Telegram Channel
Обмен значениями при помощи кортежей

Один из популярных трюков в Python – обмен значениями без создания временной переменной. Способ применим для любого числа переменных.

В правой части инструкции присваивания последовательностей допускается указывать любые итерируемые объекты. Главное, чтобы число элементов слева равнялось числу элементов справа. Такое присваивание применяется и для сложных вложенных конструкций.



tg-me.com/pythonist24/1373
Create:
Last Update:

Обмен значениями при помощи кортежей

Один из популярных трюков в Python – обмен значениями без создания временной переменной. Способ применим для любого числа переменных.

В правой части инструкции присваивания последовательностей допускается указывать любые итерируемые объекты. Главное, чтобы число элементов слева равнялось числу элементов справа. Такое присваивание применяется и для сложных вложенных конструкций.

BY Python обучающий




Share with your friend now:
tg-me.com/pythonist24/1373

View MORE
Open in Telegram


Python обучающий Telegram | DID YOU KNOW?

Date: |

The S&P 500 slumped 1.8% on Monday and Tuesday, thanks to China Evergrande, the Chinese property company that looks like it is ready to default on its more-than $300 billion in debt. Cries of the next Lehman Brothers—or maybe the next Silverado?—echoed through the canyons of Wall Street as investors prepared for the worst.

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

Python обучающий from fr


Telegram Python обучающий
FROM USA